package com.vilen.weixin.model;

/**
 * Created by Administrator on 2016/2/17.
 */
public class DuplicateMessage {
    private String fromUserName;
    private String createTime;
    private Long curTime;
    private String rel;

    public DuplicateMessage() {
    }

    public DuplicateMessage(String fromUserName, String createTime) {
        this.fromUserName = fromUserName;
        this.createTime = createTime;
        this.curTime = System.currentTimeMillis();
        this.rel = null;
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Long getCurTime() {
        return curTime;
    }

    public void setCurTime(Long curTime) {
        this.curTime = curTime;
    }

    public String getRel() {
        return rel;
    }

    public void setRel(String rel) {
        this.rel = rel;
    }

    @Override
    public boolean equals(Object obj) {
        DuplicateMessage dm = (DuplicateMessage)obj;
        if(dm.getCreateTime().equals(this.getCreateTime())&& dm.getFromUserName().equals(this.getFromUserName())){
            return true;
        }
        return false;
    }
    //放在list中 不需要hashcode判断



}
